Fix formatting
Fix formatting and clean code a bit