Added nick change support. Various other tiny changes. TODO: Refactoring is badly needed.