Resolved JSHint issues and made easier to merge into v3.1.