Add specs; refactor