Removed unused code and changed class type accordingly