Major cleanup of code and adding SuperScript.