ERAY header now has bitmasks
Fixed element duplication, more problems arised