Added DBService and fixed SessionFactory