Updated route processing to be a bit more efficient, could use a lot more work