Cleanup Chirp Server

Some mostly minor code maintenance:

o Formatting
o Simplification
o Variable localization
o Improved signal handling
o Minor bug fixes