Remove unnecessary components and reformat