Port the two short tests. Fixed some jshint-revealed problems.