Ionic liquid based approach to nanoscale functional materials