Cosmetics

I tidied up the code a little bit and changed the if's of the cached files, so the cache files should be a little smaller now..