general cleanup and replacement of crude log statements with breakpoints