Added self-detection routines. Added version numbers to the executable