Cleanup specs and handle metadata failures better