Refactor initial code
Merge pull request #59 from golyshevd/refactor

Refactor initial code