removed autowired annotation to allow multiple configurations
removed incorrect instanceofs