Restructured structs - adding linked list of links
refactor. split main into multiple functions
removed useless