Some obscure constants generation code...