Added support for varregions etc

Added support for large regions e.g. varregions
Minor improvements