Looks like this is already partially done here, so moving more here would be good