More cleanup, defines, structure of the program.