improve string representation for abstract_factory
duplicate method removed
delete extra line
change in output format and adding constructor for Handler
fixes of merge request