Refactors layer helpers.