Remove some superficial syntax
Use filepath instead of custom f for extension replacement