chore(superdesk lib): Reorganize the code