Manipulating nanoscale structure to control functionality in printed organic photovoltaic, transistor and bioelectronic devices