now O(n) rather than O(nlogn) where n is the number of requests. The refactoring also cleans up the access of the request lists so that the code is more readable/maintainable.