Added session factory and basic session class