Declare helper macro first
Use explicit cast to silence conversion warning
Declare local functions and variables static
Add format attribute to append
Add com.apple.itunes.liked-state