Improved Typebased compiler api.