Continuing to refactor. #22

* Sampler is now a class which inherits from threading.Thread
* scripts/plot.py works
* scripts/record.py works (but is rather ugly)