Trying better cost analysis, attempting to make simulator reusable