Refactor keyword.evaluate to be cleaner.