Adding antiflood and some minor changes