Structure and Phase Transitions in Nanocrystals