Tests and simplification