Modulize resource path processing code