renames target name and do some code formatting