Minor optimization and code documentation fix
Improve code documentation