Fix errors from #3

This should fix the errors in #3. Let me know if there are any more, and if there is anything you don't understand.