copied files from WebNoteNoSQL, work in progress