Minor code clean-up and comment additions