Closes #82 - fix main issues raised in this ticket

There is a serious problem with this tutorial and it doesn't produce a
working module in its current form. I have resolved all of the issues
that @TheLogan raised and will open a new ticket for this new bug.