fixes a lot of obvious errors. Actually sort of runs some code now