Refactoring ?EM and ?M's to be generic and cache   -The Javatar