Code formatting and optimization in logo adapter