chore(codestyle): simplified some test code, idiomatic dart

Squashed commit of the following:

commit ec8fe25854feab387ec97974cba088df03b66e28
Author: Victor <victor@suumit.com>
Date:   Mon Dec 9 19:24:35 2013 +0100

    fix CS

commit 461523ee0cd974793fc259f3a8079801e8e0cfe9
Author: Victor <victor@suumit.com>
Date:   Sat Dec 7 16:07:57 2013 +0100

    Misc simplications / idiomatic dart

commit deb4102048fc8c69a6e6e34de5b7c30db9cf1fc7
Author: Victor <victor@suumit.com>
Date:   Sat Dec 7 15:51:35 2013 +0100

    Simply a function