switch to coffeescript do notation; use RAF shim instead of native