[Com] Added comments and formatted the code.