Before I do any class division. Cleaned up code, added comments, changed brightness matrix from float[][] to double[][].