Fixes all syntax errors and missing references
Merge pull request #12 from simon816/fixes

Fixes all syntax errors and missing references