Changed ui and fixed pagination