Reformatting code and optimizing imports