Adding generic prepare resource support