Added a cpu run function
Added rudimentary run function. Code looks dirty.