Separated the functions in different files.