Fixes and cleaning up