Created pool class. Not tested as of yet.