Improving comment and reordiring the code.