Added small changes to code, now runs more or less straight with no manual fixes.
Somehow.