Remove unused code and remove TODO