Separates and refactors Module and promise classes for the sake of maintainability,
Refactors build task for that