refactoring, clean up, and adjustment of acknowledgement queue