Improved the TypeCode
Added test verifying the uniqueness of the flags value