Made some big fixes, everything seems to be working.
Now need to create the actual string to be used by MainWindow.