cleaned up the code slightly, and made the program compatible with .net 2.0