polish code formatting plus minor fix