implemented FilesystemCache and NullCache, refactored environment a bit