Fixed clustering bugs and added AIO control