Transcribe previous code style to public repo

Also adds instructions to run tests from the test directory.
Merge pull request #24 from heaths/codestyle

Transcribe previous code style to public repo