add enum, rename file, make NULL checks prettier