Transition to Racket and clean-up the code a bit