Added spike detection
Fixed conflict errors