fix coding conventions & compile errors