Tail : minor modifications
Head : failing test cases corrected