Code Cleanup

Changed from using the older MsgBox function to the more modern
MessageBox class. Minor cleanup and a few comments added as well.