small tweaks to clean up code