opswork layer configurable, tidied code