Rename types and move some tests