Cleaned up debugging messages.
Added function declarations.
Messages are now printed through AGS facilities.
Improved build instructions for Debian.