Remove unused code from SessionFactory

Reference: https://www.pivotaltracker.com/story/show/65933082