Convert most code to new inner attribute syntax.

Closes #2569