tidied up enum names, fixed frame error detection (nw)