Code Cleanup: First Pass

Fix: random line breaks, duplicate commands, whitespace, minor
organization, indentation, and semicolons