Improving nanoscale electrical contacts and junctions