Not for merge. Updated data handling. Added valid cache.