Divided the code into more files