queue based handling WIP. Compiles and almost runs.