Improve scripts; support file extensions