Added drag/drop and state preserve support