better edit and statement URI handling