turn map and chapter functionality into modules
refactor events, ui and chapter management
refactor events, ui and chapter management