Use macros for protocols and applications

so we can easily change the formatting.