Show both start and end up for branch.
Removed unused variable.
Fixed memory leaks and wrongly typed ints.