openssd: reordering functions for clarity