Add models serialization to support AJAX properly.