Simplify app ref generation

This works because 256^5 = 32^8. The downside is that we can't easily
generate different length references any more.