Fixes and clean up