minor cleanups, comments added