added few comments and did indent.