clean up names and comments, make production-ready