small changes of code organization