Add some debug logging.
Move main source files to top level.