Fix bugs and refactor codes.