Added more sync'd scripting functions
Cleaned up some code