Fix code structure