Updated component code to have destructors; required to have clean shutdown when killing process.