Code reformatting and import optimization