Real fix for the Json serialization problem is to remove all the unused code.
Added automatic removal of old temp files on startup in the commandline.
Added a timer to periodically purge temp files from the server.
Removed a few compile warnings