commenting and refactor the calcExchange method

Signed-off-by: Alexander Skjolden <alex@plastboks.net>