Added banned values function, and tests for function interaction
Factored common code out of the functions, into generator