Stripped out old unused code, fixed constants

Thanks to @JasperTandy for pointing me in the right direction with
regards to constants. They seemed to be working beforehand but I’m sure
that they work better now :)