add reference to statmap to terminal
wrong import order
move event logic to terminal.go