auto-format and delete unused code