Fix #78

Switch to UUID system
Fix #87
Fix #88
Fix compile issue
Fix #89