Fix support for abstract classes #13 and add tests