Notice fixes, cleanup

Notice fixes, cleanup