Added major functionality to foster.html/js and all-animals.html/js