Refactor to simplify
Merge pull request #1 from jadedgnome/dev

Refactor to simplify