Fixed styling and cleaned up code