reformat Plex code files
simplify code