This is starting to get unwieldy, with nine arguments. Would passing a hash around be easier?