use Array.from
end files with new line
added a semicolon
simplified constructing edges in context view