some minor cleanup and documentation