Bugfixes and refactorings + DesignDataCache.
More bugfixes.