Some cleanup, made the cache an object and gave it it's own file. More stuff to follow this weekend