some cleanup and small edits