Reorganized code to clean up some boilerplate.
Merge pull request #1 from bsummer4/cleanup

Reorganized code to clean up some boilerplate.