Rewrote argument handling from scratch, polished debug tracing, and fixed a crash with stacks/queues.