Startet implementation of logic for building up a typelib registry