Order the declarations correctly