Implementation of addFirst/Last(), removeFirst/Last() methods and iterator