Add pseudocode, intuition section and comments.