Clean up code

Fix indentations, whitespace, and layout