indentation and some cleanup