Refactor specs

Ready to merge.