Refactor main Chaff src. Add test to ensure a new object with not 'with' call.