Added template tag to return leaves_taken.