Fixed a whole bunch of problems in main. It's working again. Some features are still commented out in the svg code