Add custom ORM Purger. Add reference functionality. Litle fixes and refactoring