WIP: Signal handling almost working
Fix segmentation fault
WIP: Cleanup things