Externalized JS for reuse
Added default sorting for model objects