Cleaned up some code and enabled sessions.