Computer controlled pets

and several bug fixes and improvements