Rearranged cluster attribute code to make it more clear. Bug fixes in sieves from 2011 paper