A LOT DONE. See description

Many functions rewritten. GUI Rework (again), Machines now work! Fixed
bugs. Sorted functions and variables into seperated files. Done some
CSS.