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

Cleaned up repeated functions