small edits and bug fixes