Ported new v3.1 fixes for #2007 to v3.0.
Fixed JSHint issues.
Resolved merge conflicts.
Merge branch 'master' of https://github.com/wet-boew/wet-boew