Refactored each one as a separate module.