minor fixes, cleanup