Started refactoring
merge with master
Merge pull request #2 from devilicecream/refactoring

Refactoring