Cleaned up some code

Updated Editor scripts to match new variables.
Refactored some code in functions.
Renamed variables.