Reworked button/factory relationship

Offset the calculation for factory costs from the button to the factory
class.