Cleanup

Cleaned up some errors and included a test case to test the pool