more cleanup, renaming, better output