Remove done todo
Move branch to function