Simplify extension matching a bit