update to remove use of deprecated functions, minor comments