Refactor modularity