Fixed some minor bugs and passes test cases for up to 80%. Still some
issues (e.g. duplicate longest path)pending.