Fix incorrect return statements

Return statements shouldn't appear in the main body of the script. Add
"use strict"; to the tests as well.