Code style and resources optimization