Fixed a bug with extension functions.
Changed type order to prefer substituted versions.
Fixed extra type options.
Fixed a bug with creating methods in the wrong owners for next and hasNext.
Added tests.