added doctrine provider
reworked internal architecture, added tests and changed main class name to be more consistent