sql to fql self-loops, adom, viewer fixes