Removed unused duplicate code