Removed unused and refactored