Deleted redundant method and code refactored.