Function to strip idents