fix final score code style and remove useless code