Avoiding warning from -Wstrict-aliasing and some small code refactoring
Code cleanup and ignoring additional signals in deamonize()