Only show debug statments when debug? is true. Reorganize handle* defs to be grouped together