Code-Based Procedures for Seismic Safety Assessment and Retrofit