a bunch of edits/improvements