If you want to write a test program that is somewhat different than the "main" program, it's usually very beneficial to put all of your program logic in a module. I'm doing this more and more as time goes on. Modules help me read less code at once, and I'm all for that.