Program now works again but code missing comments and some of it may
still be different