Refactored inlining visitor, added explicit error message when factory can't be found.
Added public weakly typed register methods