Removed unused code and references