Fixes

Bugfixes
Cleaner formatting