code style and cleanup
fixes #57