Added files from wenzul's zip. Made some changes and reinstated local caching into serverdata.php