Remove unused code.
Fix a bug in getting nick.