Minor pet model & controller refactor, adapted the server, fixed a bug