added a bit of basic logging, fixed a few comments