Tidied up existing lib and specs