Partial checkin of #61