rearrange object link order
smaller valued error codes for simpler switch handling
uninitialized variable fixes
add test.041