Structure and quantum effects in atomic-sized contacts