Separated json and html controller methods. Better error handling.
Fixed controller tests
Updated README