Major bug fix for Mac OS and speed improvements.