Cleaned up code for black-gradient