remove comments and format code