Fixed autoloading issue
Moved doctrine bootstrap code to di container
Some small fixes