PER-13: small AbTesting code cleanup and started server-side implementation