Commented and removed unused code