added ban option, some code fixes and improvements