Extract shared variables, clean up test docs