Added closure and fixed whitespace function & test

Created a closure which increments and decrements a value, updated the
whitespace function