recovery from crash

added few comments and fix indentations