Adding length check, caseless blacklist match and sorting blacklisted commands.