Made some functions static