improve the readability and usability of component parser, part 1
update the code which is used to format the txt file