minor formatting, optimizing, fixing