Code review comments incorporated.