Fix formatting and many errors