Refactored to make building your own simulation a bit easier