Made some edits to the code structure.