- Fixed bub in calcScost
- Cleaned main and add regulation for non negatve storage cost