Polishing and adding some caching, still a little buggy but whatchagonnado