Refactored source codes.