Refactor Cabal layer functions
Refactor sandbox layer functions
Refactor app layer functions