Improve indentation and whitespace cleanup