Minor changes to improve code order