Modified exit and cleanup situations
Removed terminate_process_group sub and replaced with explicit kill builtin