fix various issues with code style