prettify and some minor cleanups