More mapeditor code....

Issues:  Buttons break sometimes.