cleanup, tweaks. partly related to #292