reapply some improvements to code style section in different branch