Refactoring some stuff like all of it