Re-factored Inliner to make recursive and a module