Better error and success handling. Also respons template.