Refactoring and added new tests.
Merge branch 'master' of http://github.com/orby/hackaton
BLUE: Test green :)))