Added a logger thing. Needs a lot of tweaking, but at least it's interesting