add level and domLevel, fix parent, cleanup