Will try and tie things together using finite-state machines. No idea
yet how this will work out code-complexity-wise