Did some refactoring
Moved side effect updateCosts out of updatePrimaryStats as this was not its responsibility