Implemented task killing. Made tests a little better.