refactored magics to be extendable. Moved REPLServer to it's own class