Fix indentation and some coding style issues