code cleanup, added status field and ETag reusing