Code clean up + improve storage saving implementation