removing some bibtek
Fixing some type scope issues to use the new factory api