refactored code for adding pet, serious bugs in Pet and App slider code