Refactor

closes #3, #5, #6, #7, and #8