Rename beforeValue and afterValue

This is to avoid a flaky V8 bug in beta/unstable Chrome on Travis.
Somehow beforeValue was being set as undefined: http://postimg.org/image/6ej865plh/