fix factory binding + remove unused imports