Refactor organization of code
Merge pull request #1 from ianks/refactor

Refactor organization of code