Moved functions to different files