Moved routing code to allow access to cache, removed redundant cache code