refactor and fix styling for numbered links