WIP Gigantic refactoring and cleaning... will it end one day?