Run Refactored

Refactored the run() method of the Core class.