Add dirty tag
Replace functions that add lines
Make caches write-back