Introduce formatting and work on fixes