Fixed stale cache issues, a lot of other stuff