Fix performance and reorder issues.

Need to add paging method and ajax method.