Refactored signal handling
Refactored libuv integration