Small fixes and cleaning