Improve code modularity
Merge pull request #51 from powerist/working

Improve code modularity