Restructure some stuff to make it more consistent