Slightly more robust test program, fixed constructors