added some logging stuff. made some stuff prettier. added documentation for using logging.