Added sorting and save/load functionality