Updating save functions. Fixing JS quriks