Make rules and MAX_DEPTH static members.
Replace util usages to browser equivalents.
Browser support.