cs_resource almost done

Change-Id: Ie9db3f38c93d567c5a043a5eaa87720705a9803d