separated some of the code into separate txt files