Some (probably unessecary) refactoring