Added Valid and Tag bits logic.