improve layer frontier definition in class Layer