This does all the code changes to allow 513 testing, once this all seems about correct it should be merged even if the servers aren't using 513. All changes will be made in a backwards compatible way so that this whole process should be harmless.