More logical code order