Removing unused code/callbacks, minor cleanups