Refactored resource reading methods into its own class