Clean up code

Used formatter, other minor changes