Features/ft 409 sort analysis jobs

This fixes FT-409.

I also took the liberty of removing some trailing whitespace and fixed some indenting. Also I lowercased some tags.