Fix codestyle and indentation; use new save function in update script