Moved tax calculation to a function and added display of net yield.