Updated branch to lastest in Peter Brandon's master branch

This is updated to the lastest code in Peter Brandon's master branch and has been successfully compiled and tested on Mac OS 10.6.8. I have not verified that it still build on Windows though. Good Luck! :-)