Role Of Interfaces And Structural Defects In Ferroelectric Thin Films