Fixed Terminate Function and added the CountDown

Signed-off-by: steefbrown <steefbrown@gmail.com>