Minor refactoring

Changes based on #1 but more in line with my preference in regards to
syntax and such, closes #1.