Solution processing of carbon nanotubes for electronic and environmental applications