Refactor to not interact with session from view and controller