Some refactoring and documentation, add of AutoGenerateViewDefinitionsForExtent