Changed a few things (see extended description)

Changed variable names so we don't use data types.
Changed queries accordingly.
Changed insertTrack so tracks are inserted by sequence descending.
Fixed bug in get all trending.