attach removeElement event to #links
move #links html to separate function