Sebastian Scatularo - added logic to handle method factory and moved to abstract class
Sebastian Scatularo - added logic to handle method factory and moved to abstract class