Cleaning up the types quite a bit