Review: code cleanup and minor changes