refactoring: created modules,
added functional test
Merge remote-tracking branch 'origin/master'