Change to machi and fixed invalid

Changed machi to a string to facilitate new logic. Changed instances of
invalid to invalidMeld as update.