moved a lot of shit and improved the cache system