refractor updating notebook.
* try to remove double for-loop as possible for performance
* remove duplicated actions (move paragraph while deleting paragraph)
* better readability
fix indentation and typo
Merge pull request #205 from NFLabs/refactor-updating-notebook

Refactor updating notebook