implemented more dumping, removed useless checks, added sgs_PushItem
updated debug output, fixed memory access in sgs_ToStringBuf