Re-structure namespaces and introduce re-use of large portions of the codebase