Add pop first and pop last functions to list