Added a lot of shit that will need refactoring later