Update and refactor spec