Refactored a whole lot of different files