Deleted unused constants, added downsampling