Move spec out of lib