removed unused offset_key
removed block comments
simplified get_polys