WIP - getting to the stage of needing a state machine...