Remove unused protocol and a playground that didn't work too well.
Pull out the constants needing calculation as private globals.