Implementing Template Class for CItem

This commit is not stable. I've tried making CItem from Object to
Template and now it breaks everywhere. HELP