Fix some formatting issues and fix cmake file