Refactored iter and mut_iter

Replaced match by self.as_ref() and self.as_mut()