Fixed issue in #959 by filtering href to ensure just working with the hash portion of a URL.
Resolved JSHint issues and made easier to merge into v3.1.
Resolved merge conflicts.