abstractified some stuff