Adapted from my makeMolecules program. I made this to demonstrate the same principals in a win-32 environment, rather than POSIX