[style] remove unused code and fix whitespace