Spikequeue refactoring

I think this branch is ready to merge now, there are still some inefficiencies but we can address them later (#169).

Closes #141.