Great patch. Works perfect. I did some reformatting to reflect the "coding guidelines" and pushed it to the repository (commit 4fc593050f744f6ff72fd39ebf27f7ed70d495ca)
http://github.com/pocmo/Yaaic/commit/4fc593050f744f6ff72fd39ebf27f7ed70d495ca Sebastian

