Removed unnecessary header and refactored.