Clean up (refactoring/commenting) of working queue and its tests