fixed infinite loop on cycles. the structuring algorithm doesn't understand loops yet but it isn't erroring now at least. fixed all if-cases to check for final return -- ended up breaking 5 if-else tests due to terminating the code path early. will amend.