Removed independent cache directory, minor code cleaning