Pass rubocop lint and add some minors improvement.