promises and entitymanager reworking, fixed some docs.