Get rid of vicious mapentity dependency