Extracted extraction of rects into different module
Added chunking and buckets implementation