Move $skip_pools populating to function
Merge branch 'populate_skip_pools'