clean up; and some minor improvements