Last few changes

Tried to fix the errors, to no avail.
Fixed some small problems