Added first version of resource_pool.
Minor cosmetic changes.
Added comments.
Merge branch 'resource-pool' into develop
Added ResourcePool to base.