Added configurable max layers in a sandwich