cleanup, some minor fixes