Removed lots of unused codes and auto-gen comments