Some refactoring and DRY-ing upp the specs