Cleanup resource interface. Add caching for rest resources.