minor cleanups on formatting, final vars, use logger instead of sys out