Created animalObject and bug fixes

Created animalObject and added functionality that creates a new
animalObject when a newAnimal becomes a workingAnimal and sets their
AnimalIDs together. Also minor bug fixes with re-sorting animals causing
duplication of certain elements.