[SD] Refactor code.
[SD] Refactor code.