Added upgrade framework and now calculates increase in code and money per second.