Move spec support to lib