Fixed minor issues, proper structure is now found for task4

Next step is outputting it to a file in the proper format and then testing the subsequent tasks