Decoupled pool and other dependencies

Made dependencies more explicit for easier testing and mocking.