Examples cleanup and macro fixes