Cleaned up repeated functions
Merge pull request #21 from emsiepopples/master

Cleaned up repeated functions