code cleanup
design doc update