Cleanups before release

This pull request contains cleanups before release. It removes unused code, applies codying style, etc.