Fixed some syntax errors from Matt's code.