Remove debug code
Overhaul the mode parser
Add a mode tracking mixin