Separated the code into different files.