Split some functions, started work on tag editing page, fixed text parsing.