added sort in tables, enhance appearances, fixed bugs