fixed gui and io stuff, added mime handler