Also added the debugging print that helped find these issues. Revert inlining some functions in examples