Various small fixes, formatter needs further work
Various small fixes, formatter still needs work