some refactoring

Was reading through some things in the store and refactored a little as I went, tests all still pass.