Moved code into seperate files, becaues one file is getting to big