Implement basic inlining and a few related things.