Improved some scripts