Some more bugfixes, added new image handling code. Need to make more bugfixes before site is even workable.