small fixes and cleanups