Shells are probably small dudes that expired. They were most likely living in your rock work.
The clumping happens to the best of us. I think it has to do with calcium and alk precipitating out.
Recommendation is to extract what you don't like. Add new sand with a long tube or funnel, might be a 2 person job or do it in small batches. Turn off the flow though. Gl