Introduced concept of active pet
Foregrounding, backgrounding, minor fixups