Updated quality, changed variable names.
Cleaned up code a bit, changed quality division, added OS X support.