Refactor to eliminate references to Popbox layers adding a generica array