gui integration + minor debugging