Dropping the extension.
Improvements from @staabm