Bucket size now changes depending on level

This way there are less buckets to check for smaller maps but still
optimized for larger maps.