Resolves #9 -- Was not comparing abstract types properly
Added tests for #9