Added more example code with creation of resources.