Refactored resource file generation