introduce generic Resource provider, add catalog module, refactoring of gallery module