Make main module detecting one way
Add test case
Merge pull request #27 from golyshevd/mini-refactor

Mini refactor