Change some function to static