General code cleaning

Line scraps
Fix casing issues with the element.before/after tags

The code is toLower'd, but the if statements weren't! My bad.
Catch a bit of weirdness with interact scripts

Part of a matching dCore update to fix interact scripts in general
Don't throw errors on no-argument commands

- engage
^ should not throw an error.
Merge pull request #861 from mcmonkey4eva/master

Pull request to fix major errors