Bit of a refactor. Now returns an output percentage rather than calculating final values.