Fixed reading/writing/all that jazz
Scripts now write properly
Removed debug output