Refactor callback setup in to use lambda instead of eval

Replace the use of an evaluated string literal with a lamba.