Partial addition of classes, recursion and error handling