Second round of module refactorization