Added helper functions for state diffing in gui