Fixed a lot more errors, only syntax errors left