Small edits and bug fixes