JSON level loading

Entity definition class; entity factory now handles allocation