Upgrade DAP or IEM’s first?

I have an AK Jr. DAP and Ultimate Ears UE900s IEM’s. Which should I upgrade first to maximize sound quality? My budget is $650.

Personally I think you would be looking for iems this time, the ak jr is still pretty good, with that budget you can get some nice iems depending on what you listen to

Any recommendations for IEM’s w/detachable cables? I listen to rock, metal and EDM/electronic. Budget is up to $650.

I can recommend Obravo Cupid and Meze Rai Solo for rock and some electronic music. The cupids have a pretty interesting sound sig that can just sound magical sometimes, but are very tip and seal dependent. The Meze is more of a neutral signature with a strong focus on upper mids, and have very refined bass. They are both ridiculously comfortable, with the meze winning out slightly.