Minor edits; code cleanup