Fix case of files
Fix naming of fields in notes
Minor cleanups and fixes for server code