Space error
Use library macro to avoid manually receiving events.
Make buildable into a stand-alone executable.
Same semantics as the go version