some housekeeping (logging, code cleanup)