Added sanity checking and annotation inlining.