Added iterator.
Added main.
Fixed issues.