Structural and electronic properties of superlattices and interfaces