Refactors and stuff
Merge pull request #237 from jcadek/master

Refactors and stuff