Remove some print statements, and handle options for debug output and threads.