Use Length notation instead of size / capacity
Switch to struct based enumeration
Added missing IsInitialized test