Biomedical and environmental applications of magnetic nanoparticles