Fix error handling & refactor to be fully asynchronous

Quite the rewrite, but refactors to eliminate the weird queueing system internally.