Cleaned up the code, added channels functionality, added some commands.