Dropped sorting in some places for better performance