Electronic structure and morphology of organic/metal/organic junctions