added publication model and fixed sort order on tables