Some minor changes.
BUG: sell_cost is Long, not Int, but used as Int. Fixed.