Moved new code to be more similarly located to old code.