The geochemistry and mineralogy of contaminated environments