Small fixes and clean up