Fix indentation to 4 spaces
Change function name
Clean up mess. No more spaghetti code..
Add in default states for elements