Move resource file stuff into its module