Remove unused code & fixing bad import