Now compiles and runs as intended

array_cmp looks for compares data[] with mime type[], doesnt make
sense...
Neatened things a little, still works