Reworked the code to functions that do block tesing.