Added compatibility with older systems, plus reorganization
of files.