Refactor guice inject logic