mini: function add_head() was only used once, write it directly
mini: function remove_tail() was only used once, so write it out