Corrected the implementation of abstract methods to properly handle classes, instance arguments and indirect return types.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>