Fix formatting and crappy code