Code cleanup
get branches method