Implement transactions in DomainManager, remove useless code & cleanup