Add handler for sigint cleaning, move funcs to class

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>