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

Refactoring