minor revisions and cleanups