got JS-only and JS+PHP code in @cassisjs to pass JSLint+JSHint (global variables gone). next: sanity check unit tests.