Added figure and listing and modified many sections.