Changed code to reference resources independent of filepath.