turn HackTyper into a module and clean up code a bit