Refactor and fix a few issues on the available dogs page