Introduce weight and stop concepts, clean up some tests, add more tests