Make ResourceProxy an inner class