remove commented out code + fixed extensions check