Remove unused/unimplemented functions and cleanups