minor fixes and clean ups