Bunch of changes, mainly with how termination is done.