gist edit, some cleanup