General bugfixes and added EmptyRegion.py.