housecleaning: code reformats and import optimization