migrated most functions to wiki.js, some fix ups, etc.