Fix style, code polishing