(Issue 696) WIP; misc fixes