Fixed global var in base test

Other changes:
- Added documentation to pool function