Styling and tests

Adding tests, styling, and a bit of convention