The formula interface for layer functions

Good point. Done.