Wrote start/stop logic

Needs fixing though!