Code minor cleanup and commenting