add scripts and improve structure