Merged Todd's stuff