Refactored modules to require their own dependencies instead of passing everything