More refactoring and sub-project creation