Fix some code issues. Closes #2.