cleaned up html. throw on ajax error