Tidying and commenting
branching error