Remove broken afk handling and fix some bugs.