Finish off encoder thread and start more flexible encoder interface