Do some small refactoring to improve the readability.