cleanup and small tweaks