Get rid of `tag` function and remove trailing whitespaces