Fixed code that removed 15-bit color mode.

15-bit color mode is now removed on all platforms.
The removal of 15-bit color mode now happens before the sort.
Updated a variable name.
Changed list length calculation to use C++'s clever pointer
subtraction.