Implements basic module execution logic.