remove line breaks from the command map
remove ref and use href and handle Top specifically