Create session manager, create context base, refactor server setup