Added basic mechanism for environmental modifiers

Untested and unused
Fixed syntax bug