extremely basic functions for the jpg file format
better mime fixing
catching up on random stuff