Move session manager to separate file