Added basic behaviour to the discount calculator.
added comments.