Much better extension parsing.