Change naming an removes inexistant links
Adds necessary class_name function to the model