This commit implements the section 8.3 of the RFC
Implements the termination process

Fixes #92

Signed-off-by: Ivo Calado <txithihausen@gmail.com>
Signed-off-by: João Correia <lucaskm98@gmail.com>