rework some stuff; move some tests around