Tidied up the tests and lib code for unused parameters smell