Added simple save method
Fixed GetFlag
Added save function