Added sections and restructured code