tiny edits to problem1.js, modularized problem3.js