fix compiler warnings and indents