Add EventQueue and refactor router frontend to use client/cache

Is this for debugging?