Cleaning and review of some scripts