Function declarations, minor refactoring
Receive QUIT