Added hashbang
Modified save loop for inverse to allow for strings