Code cleanup. Add a code style guide. Fix issue #116.