Added CRotoCache but haven't gotten it to work yet. Did some code cleanup and got rid of compiler warnings.