Improve handling of abstract class (closes #21).