Tidied up tests and unused libraries