Apply some of suggestions by delroth.