Adding session factory