Fixed MXAPITests and removed several pieces of extraneous code.