Removed unused code & fixed dependency