Refactored, cleaned up.
Merge pull request #1 from mchruszcz/master

Major refactor