Added properties for caching

Added properties for caching.
Fixed bug when nothing would be drawn if control size is smaller than
tile size.
Temporary fix for duplicate indices.