Added visitor pattern for modules

By adding visitor pattern for modules all subclasses of module can be handled by moduleService.updateModule() instead of writing a new method for every subclass