This aint no xhtml!
Better AJAX error handling.
Merge pull request #61 from rafalp/develop

Merged in improvements from dev branch