Cleaned up code, writing edits for section 1