Refactor bool function
Merge pull request #29 from trev/TidyUp

Refactor bool function