Improve some scripts