Corrected pool size errors, refactor counter code