Handle json serialization in view instead of template
Only focus on search field on empty search