Extended grammar for extra layer in regulation; reused code to make contains a bit more concise