Added sorting to building lists