Small changes, use metaprogramming instead of a switch statement