Some functions and some scripts