Fixed errors, some code blocks still not working