Add EventQueue and refactor router frontend to use client/cache

I don't think it should be addressed in this refactor, but just to note the idea: should there be a struct to represent this input? That's a lot of weird looking args.