Made the program more DRY by replacing the copy-paste addHandled and InsertHandled methods with an abstract getSupportedClass method that automaticlally does the trick.