Fix code design