remove now unused Map import
refactoring: pull function definition out of case statement
remove old comments