Cleanup formatting and organization

This PR allows `go test` to be used instead of running an example file. Further, it uses the correct organization so it can be imported from other projects.