Prettier git messages and another big refactor of ref parsing