Simplify spec and code