Moved every function to its own file.