Seperated some code into different files, made it prettier