Implemented starting and stopping capabilities

Needs more testing, only tested with simple,
minimal examples