First commit after beginning to port Sean's code.