Consolidate library require code
wip
wip