Fix syntax errors. Closes #1, closes #2