style processing refactoring and fix for #148