Third part of code reorganization