More steps towards the implementation of the corresponding regions.
Cleaned up some more code.