Format code - consistent casting