Separated code into separate files for sanities sake