Changed functions to static