Uses dict w/lambdas as a switch-statement.