Fixed coding style and other minor issues.