Fixed max shades so no crashes happen...

Also re-added copyright.