Simplified resolution sorting code