General formatting clean-up

Fixed inconsistent indentation, organized code logically, general
whitespace clean-up.