Fixes all syntax errors and missing references

I don't know whether my project setup is incorrect but there were a lot of errors